package com.mdd.common.enums;

import com.google.common.collect.Maps;

import java.util.Map;

/**
 * @ClassName OrderTypeEnum
 * @Description
 * @Autore Slien.zuo
 * @Date 2022/10/10 16:19
 * @Version 1.0
 **/
public enum OrderTypeEnum {
    GENERAL(1, "普通订单");

    private final int type;
    private final String desc;

    OrderTypeEnum(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    /**
     * 获取状态码
     *
     * @return Long
     * @author fzr
     */
    public int getType() {
        return this.type;
    }

    /**
     * 获取提示
     *
     * @return String
     * @author fzr
     */
    public String getDesc() {
        return this.desc;
    }

    public static Map<Integer, String> getMap() {
        Map<Integer, String> map = Maps.newHashMap();
        for (OrderTypeEnum codeEnum : OrderTypeEnum.values()) {
            map.put(codeEnum.type, codeEnum.desc);
        }
        return map;
    }
}
